home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / CASCADE.HDR < prev    next >
Text File  |  1994-04-25  |  3KB  |  81 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Cascade( cStartDir, cUDFName ) --> nInteger
  8.  
  9. PARAMETERS:
  10.  
  11. cStartDir : Directory where cascade begins
  12. cUDFName  : Name of UDF to be executed in each directory.
  13.  
  14. SHORT:
  15.  
  16. Execute a function in every subdirectory.
  17.  
  18. DESCRIPTION:
  19.  
  20. _Cascade() starts at the current directory (if not specified otherwise
  21. in cStartDir), and executes the UDF named in cUDFName, one time in
  22. the current/specified directory and once in each subdirectory thereof.
  23.  
  24. Note that you cannot change drives with this function.  i.e., you cannot
  25. pass "D:\STARTDIR" to cStartDir and expect to see directories on that drive.
  26.  
  27. _Cascade() only changes the current directory to the specified directory,
  28. and does not log new drives.  You must do this yourself if it is necessary.
  29.  You can see exactly why by typing a CD command yourself on the DOS
  30. command line.  While on C: and with a diskette in A:, type CD A:\DIRNAME.
  31.  Notice that the directory is indeed changed ON DRIVE A:.  But you are
  32. still logged on Drive C:.  Same thing happens here.  !!Be on the drive
  33. you want before calling _Cascade().
  34.  
  35. In a network environment, you may want to specifically log the drive you
  36. need:
  37.  
  38. ! M:
  39.  
  40. and then call _Cascade().
  41.  
  42. _Cascade() returns -1 if the UDF specified is not present, or if the
  43. starting directory specified does not exist.
  44.  
  45. NOTE:
  46.  
  47. *** IMPORTANT ***
  48.  
  49. BLINKER USERS: This function will use SWPRUNCMD() to execute it's DOS
  50. environment commands.  You do not need to do anything to take advantage of
  51. Blinkers Swap Function.
  52.  
  53. RTLINK USERS: This function will use "!/RUN" to execute it's DOS commands.
  54. You cannot avoid this, however you will get UNDEFINED SYMBOL warnings from
  55. the Linker.  This is because a test is made to see if Blinker was used to
  56. link the program, and the test itself references Blinker's function library.
  57. The program should work fine, though, since if the test fails, (ie, not
  58. Blinker), no Blinker functions are used and "!/RUN" commands are issued
  59. instead.
  60.  
  61. If I were you, I'd just get Blinker... :-)
  62.  
  63. OTHERLINK USERS.  I don't know.  You may be outta luck!! But if nothing
  64. else, source code is available and you can modify the function
  65. specifically for your needs.
  66.  
  67. EXAMPLE:
  68.  
  69. _Cascade(,"ShowFiles('*.exe')"
  70.  
  71. Result: ShowFiles() will be called on the current directory and
  72. any subdirectories.
  73.  
  74.  
  75. _Cascade("C:\SUBDIR\DUNGEON","Wash('*.axe','SpotLess')"
  76.  
  77. Result: ShowFiles() will be called first on C:\SUBDIR\DUNGEON and then in
  78. any subdirectories under the DUNGEON.
  79.  
  80. ******************************************************************************/
  81.